import React, {PureComponent} from 'react';
import {NavLink, Outlet} from "react-router-dom";
import './style.css'

class Projects extends PureComponent {
    render() {
        const {projects} = this.props;
        return (
            <div className="projects">
                <div className='navbar'>
                    {projects.map((e, i) => (
                        e.showNav && e.name && <NavLink to={e.path} key={i}>{e.name}</NavLink>
                    ))}
                </div>
                <div className='projects-content'><Outlet/></div>
            </div>
        );
    }
}

export default Projects;